<link rel="stylesheet" href="~/css/table.css">

<table>

            <a asp-action="Add" class="add">新增</a>

    <tr>
        <th>ID</th>
        <th>标题</th>
        <th>内容</th>
        <th>作者</th>
        <th>操作</th>
    </tr>
    
  @foreach(var item in @Model)
{  <tr>
    <td>@item.ID</td>
    <td>@item.Top</td>
    <td>@item.Cont</td>
    <td>@item.Name</td>
    <td>
        <a asp-action="Edit"> 编辑</a>
        <a asp-action="Delete" class="delete"> 删除</a>
    </td>
    </tr>
}
    
</table>